package org.inspursc.s0517.health.evaluation.dao;

import org.inspursc.s0517.health.evaluation.entity.SurveyAnswer;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.Date;
import java.util.List;

/**
 * @author B_Dream
 * @date 2018/6/6 16:37
 */
public interface SurveyAnswerDao extends JpaRepository<SurveyAnswer, Integer> {

    SurveyAnswer findBySurveyIdAndAndPersonnelId(Integer suId, Integer perId);

    List<SurveyAnswer> findAllByAndPersonnelId(Integer perId);

    List<SurveyAnswer> findAllByAppraiserIdAndAndDateTime(Integer perId, Date dateTime);

    @Override
    void deleteById(Integer id);
}
